import { Component } from 'react';
import './App.less';

import Hello from './components/Hello';

export default class App extends Component {
  state = {
    name: "bao"
  }

  changeName = () => {
    this.setState({
      name: "88"
    })
  }

  render() {
    const { name } = this.state
    return (
      <div>
        <button onClick={this.changeName}>父组件更改名字</button>
        <Hello name={name} />
        
      </div>
    )
  }
}

// export default function App() {
//   return (
//     <div className="App">
     
//     </div>
//   );
// }

